3.4.8 Divide

Divide performs polynomial division, dividing a subject expression by a divisor polynomial obtained from the user. The subject is replaced by an expression of the form d(x)⋅q(x)+r(x) where d(x) is the divisor and q(x) and r(x) are other polynomials. If r(x) is zero, d(x) is a factor of the subject.

For example, the result of dividing x^3-2⋅x^2-x+2 by x-1 is (x-1)⋅(x^2-x-2). There is no remainder, so x-1 is a factor of the original polynomial and hence x=1 is a root. The root of the remaining binomial in the example can be found using Quadratic .